package com.woniuxy.entitys;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * tb_malfunction
 * @author 
 */
@Data
public class TbMalfunction implements Serializable {
    private Integer maid;

    private String matype;

    private String madesc;

    private Integer cid;

    private Integer bid;

    private String declarantName;

    private String declarantPhone;

    private String declarantStatus;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date declarantTime;

    private Integer softdel;

    private String beiyong1;

    private String beiyong2;

    private TbBed tbBed;
    private TbHospital tbHospital;
    private TbDepartment tbDepartment;

    private static final long serialVersionUID = 1L;

    public TbBed getTbBed() {
        return tbBed;
    }

    public void setTbBed(TbBed tbBed) {
        this.tbBed = tbBed;
    }

    public Integer getMaid() {
        return maid;
    }

    public void setMaid(Integer maid) {
        this.maid = maid;
    }

    public String getMatype() {
        return matype;
    }

    public void setMatype(String matype) {
        this.matype = matype;
    }

    public String getMadesc() {
        return madesc;
    }

    public void setMadesc(String madesc) {
        this.madesc = madesc;
    }

    public Integer getCid() {
        return cid;
    }

    public void setCid(Integer cid) {
        this.cid = cid;
    }

    public Integer getBid() {
        return bid;
    }

    public void setBid(Integer bid) {
        this.bid = bid;
    }

    public String getDeclarantName() {
        return declarantName;
    }

    public void setDeclarantName(String declarantName) {
        this.declarantName = declarantName;
    }

    public String getDeclarantPhone() {
        return declarantPhone;
    }

    public void setDeclarantPhone(String declarantPhone) {
        this.declarantPhone = declarantPhone;
    }

    public String getDeclarantStatus() {
        return declarantStatus;
    }

    public void setDeclarantStatus(String declarantStatus) {
        this.declarantStatus = declarantStatus;
    }

    public Date getDeclarantTime() {
        return declarantTime;
    }

    public void setDeclarantTime(Date declarantTime) {
        this.declarantTime = declarantTime;
    }

    public Integer getSoftdel() {
        return softdel;
    }

    public void setSoftdel(Integer softdel) {
        this.softdel = softdel;
    }

    public String getBeiyong1() {
        return beiyong1;
    }

    public void setBeiyong1(String beiyong1) {
        this.beiyong1 = beiyong1;
    }

    public String getBeiyong2() {
        return beiyong2;
    }

    public void setBeiyong2(String beiyong2) {
        this.beiyong2 = beiyong2;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        TbMalfunction other = (TbMalfunction) that;
        return (this.getMaid() == null ? other.getMaid() == null : this.getMaid().equals(other.getMaid()))
            && (this.getMatype() == null ? other.getMatype() == null : this.getMatype().equals(other.getMatype()))
            && (this.getMadesc() == null ? other.getMadesc() == null : this.getMadesc().equals(other.getMadesc()))
            && (this.getCid() == null ? other.getCid() == null : this.getCid().equals(other.getCid()))
            && (this.getBid() == null ? other.getBid() == null : this.getBid().equals(other.getBid()))
            && (this.getDeclarantName() == null ? other.getDeclarantName() == null : this.getDeclarantName().equals(other.getDeclarantName()))
            && (this.getDeclarantPhone() == null ? other.getDeclarantPhone() == null : this.getDeclarantPhone().equals(other.getDeclarantPhone()))
            && (this.getDeclarantStatus() == null ? other.getDeclarantStatus() == null : this.getDeclarantStatus().equals(other.getDeclarantStatus()))
            && (this.getDeclarantTime() == null ? other.getDeclarantTime() == null : this.getDeclarantTime().equals(other.getDeclarantTime()))
            && (this.getSoftdel() == null ? other.getSoftdel() == null : this.getSoftdel().equals(other.getSoftdel()))
            && (this.getBeiyong1() == null ? other.getBeiyong1() == null : this.getBeiyong1().equals(other.getBeiyong1()))
            && (this.getBeiyong2() == null ? other.getBeiyong2() == null : this.getBeiyong2().equals(other.getBeiyong2()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getMaid() == null) ? 0 : getMaid().hashCode());
        result = prime * result + ((getMatype() == null) ? 0 : getMatype().hashCode());
        result = prime * result + ((getMadesc() == null) ? 0 : getMadesc().hashCode());
        result = prime * result + ((getCid() == null) ? 0 : getCid().hashCode());
        result = prime * result + ((getBid() == null) ? 0 : getBid().hashCode());
        result = prime * result + ((getDeclarantName() == null) ? 0 : getDeclarantName().hashCode());
        result = prime * result + ((getDeclarantPhone() == null) ? 0 : getDeclarantPhone().hashCode());
        result = prime * result + ((getDeclarantStatus() == null) ? 0 : getDeclarantStatus().hashCode());
        result = prime * result + ((getDeclarantTime() == null) ? 0 : getDeclarantTime().hashCode());
        result = prime * result + ((getSoftdel() == null) ? 0 : getSoftdel().hashCode());
        result = prime * result + ((getBeiyong1() == null) ? 0 : getBeiyong1().hashCode());
        result = prime * result + ((getBeiyong2() == null) ? 0 : getBeiyong2().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", maid=").append(maid);
        sb.append(", matype=").append(matype);
        sb.append(", madesc=").append(madesc);
        sb.append(", cid=").append(cid);
        sb.append(", bid=").append(bid);
        sb.append(", declarantName=").append(declarantName);
        sb.append(", declarantPhone=").append(declarantPhone);
        sb.append(", declarantStatus=").append(declarantStatus);
        sb.append(", declarantTime=").append(declarantTime);
        sb.append(", softdel=").append(softdel);
        sb.append(", beiyong1=").append(beiyong1);
        sb.append(", beiyong2=").append(beiyong2);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}